<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.js"></script>
 <script src="http://code.jquery.com/jquery-migrate-1.1.0.js"></script>
<script type="text/javascript">
$(function(){
	$("#headSearchBtn").click(function(){
			location.href="searchProductListByName.do?name="+$("#headInfo").val();
	
	});
});
</script>

<nav>
	<ul>		
		<c:choose>
			<c:when test="${sessionScope.cvo==null }">
				<li><a href="${initParam.root}/consumer_login.do">로그인</a></li>
				<li><a href="${initParam.root}/consumer_register.do">회원가입</a></li>
				<li><a href="">고객센터</a></li>
			</c:when>
			<c:when test="${sessionScope.cvo!=null }">
				${sessionScope.cvo.name }님 로그인^o^! 
				<li><a href="${initParam.root}/logoutconsumer.do">로그아웃</a></li>
				<li><a href="${initParam.root}/consumer_update.do">정보수정</a></li>
				<li><a href="">구매내역</a></li>
				<li><a href="">고객센터</a></li>
			</c:when>
		</c:choose>
	</ul>
</nav>

<input type="text" id="headInfo">

<input type="button" id="headSearchBtn" value="검색">
